﻿using System;

namespace Fjaspx.UI.Web
{
    public partial class Remark : AdminPage
    {
        /// <summary>
        /// Handles the Load event of the Page control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                Bind();
                if (Request["t"] == "del")
                {
                    Fjaspx.Sys.Bll.ROYcms_remark bll = new Fjaspx.Sys.Bll.ROYcms_remark();
                    bll.Delete(Convert.ToInt32(Request["id"]));
                    Bind();
                }
            }
        }

        /// <summary>
        /// 绑定数据    Binds this instance.
        /// </summary>
        void Bind()
        {
            try
            {
                Fjaspx.Sys.Bll.ROYcms_remark bll = new Fjaspx.Sys.Bll.ROYcms_remark();

                Repeater_list.DataSource = bll.GetList(" NewID =" + Request["NewsId"]);
                Repeater_list.DataBind();
            }
            catch { Fjaspx.Common.MessageBox.Show(this, "绑定数据错误！"); }
        }
    }
}
